/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package com.nicolascarrascob.pds.serviciosoap.orm;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class PeliculaCriteria extends AbstractORMCriteria {
	public final IntegerExpression id;
	public final StringExpression nombre;
	public final StringExpression descripcion;
	public final IntegerExpression estreno;
	
	public PeliculaCriteria(Criteria criteria) {
		super(criteria);
		id = new IntegerExpression("id", this);
		nombre = new StringExpression("nombre", this);
		descripcion = new StringExpression("descripcion", this);
		estreno = new IntegerExpression("estreno", this);
	}
	
	public PeliculaCriteria(PersistentSession session) {
		this(session.createCriteria(Pelicula.class));
	}
	
	public PeliculaCriteria() throws PersistentException {
		this(com.nicolascarrascob.pds.serviciosoap.orm.CarteleraDeCinev2PersistentManager.instance().getSession());
	}
	
	public ClasificacionCriteria createClasificacionCriteria() {
		return new ClasificacionCriteria(createCriteria("clasificacion"));
	}
	
	public GeneroCriteria createGeneroCriteria() {
		return new GeneroCriteria(createCriteria("genero"));
	}
	
	public SalaCriteria createSalaCriteria() {
		return new SalaCriteria(createCriteria("ORM_Sala"));
	}
	
	public Pelicula uniquePelicula() {
		return (Pelicula) super.uniqueResult();
	}
	
	public Pelicula[] listPelicula() {
		java.util.List list = super.list();
		return (Pelicula[]) list.toArray(new Pelicula[list.size()]);
	}
}

